<?php 
include("conexion.php");

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link href="includes/css/jquery-ui-notarios.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" type="text/css" href="tcal.css" />
<link href="includes/css/jquery-ui-notarios.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" type="text/css" href="includes/css/uniform.default.min.css" />



<script language="JavaScript" type="text/javascript" src="ajax.js"></script>
<script type="text/javascript" src="tcal.js"></script> 
<script src="includes/jquery-1.8.3.js"></script>
<script src="includes/js/jquery-ui-notarios.js"></script>
<script src="includes/jquery.uniform.min.js"></script>
<script type="text/javascript" src="tcal.js"></script> 
<script language="JavaScript" type="text/javascript" src="ajaxlibro.js"></script>
<script type="text/javascript" charset="utf-8">
      $(function(){
        $("input, textarea, select, button").uniform();
      });
    </script>
<title>Untitled Document</title>
<style type="text/css">
<!--
.titubuskar {
	font-family: Calibri;
	font-size: 12px;
	font-weight: bold;
	font-style: italic;
	color: #003366;
}
.titubuskar0 {font-family: Calibri; font-size: 12px; font-style: italic; color: #333333; }
.titubuskar1 {color: #333333}
.reskar2 {font-family: Calibri; font-size: 13px; font-weight: bold; font-style: italic; color: #003366; }
.reskar {font-size: 12px; font-style: italic; color: #333333; font-family: Calibri;}
-->
</style>
<script type="text/javascript">

$(document).ready(function()
{
cargakardex(0)
	});
	
	function cargakardex(limite)
{
	var url="busqueda_libro.php";
	$.post(url,{estado : "1",limite: limite},function (responseText){
		    $("#blibro").html(responseText);
	  });
}

function buscaruc() 
{
	
  var _descrio	 = $('#descrio').val();
  var _dnilib 	 = $('#dnilib').val();
  var _crono 	 = $('#crono').val();
  var _rangof1 	 = $('#rangof1').val();
  var _rangof2   = $('#rangof2').val();
	 
	 
	 if(_descrio=='' && _dnilib=='' && _crono=='' && _rangof1=='' && _rangof2=='')
	{
		var limite     = 0;
		var _estado    = "1";	 
	}
	else if(_descrio!='' || _dnilib!='' || _crono!='' || _rangof1!='' || _rangof2!=''){
		var limite     = 0;
		var _estado    = "2"; 
		
		}
		
	 var _data =
	 {
		descrio 		: _descrio,
		dnilib   		: _dnilib,
		crono 			: _crono,
		rangof1    		: _rangof1,
		rangof2 		: _rangof2,
		estado			: _estado,
		limite			: limite
	 }
	 $('#blibro').load("busqueda_libro.php",_data);
	 return false;
}
</script>
</head>

<body>
<table width="773" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="726" height="25"><span class="reskar2">Busqueda Por:</span></td>
    <td width="47" rowspan="2">&nbsp;</td>
  </tr>
  <tr>
    <td><form name="frmbuscakardex" method="post" action="">
      <table width="772"  border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="105" align="right"><span class="titubuskar0">Empresa/Cliente :</span></td>
          <td width="163"><input  name="descrio" type="text" id="descrio" size="20"  /></td>
          
          <td width="87" align="right"><span class="titubuskar0"> Dni/Ruc :</span></td>
          <td width="163"><input name="dnilib" type="text" id="dnilib" size="20"  /></td>
       
        
          <td width="94" align="right"><span class="titubuskar0">Tipo de libro :</span></td>
         <td width="160"><span class="titubuskar0">
            <label>
            <input name="crono" type="text" id="crono" size="20"  >
            </label>
          </span></td>
          
      
 
</tr>
      </table>
    </form>   </td>
  </tr>
  <tr>
    <td colspan="2">
    	<table width="576" border="0" cellspacing="0" cellpadding="0">
<tr>
  <td width="193">&nbsp;  </td>
</tr>
      </table>
     <table>
        <tr>
          <td width="137"><span class="reskar2">Busqueda por fecha:</span></td>
      </tr></table>
      <table>
           <tr>
          <td width="56" align="right"><span class="titubuskar0">Desde</span></td>
            
            <td width="85"><span class="titubuskar0">
              <input name="rangof1" type="text" id="rangof1" class="tcal" style="text-transform:uppercase"  size="10" />
            </span></td>
            <td width="63" align="center"><span class="titubuskar0">Hasta</span></td>
            <td width="84"><label>
              <!--input name="nomcontratante" type="text" id="nomcontratante" size="40" onkeypress="buscakardexc()">-->
              <input name="rangof2" type="text" id="rangof2" class="tcal" style="text-transform:uppercase"  size="10" />
            </label></td>
               <td width="375"><label><a onclick="buscaruc()"><img src="iconos/buscarclie.png" width="72" height="29" border="0" /></a>
            </label></td>
           </tr>
      </table>
    </td>
  </tr>
  
  <tr>
    <td colspan="2"><div id="gennn" style="width:850px; height:690px; overflow:auto;">
      <table width="822" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="834"><table width="823" border="1" cellpadding="0" cellspacing="0" bordercolor="#333333" bgcolor="#CCCCCC">
            <tr>
              <td width="79" align="center"><span class="titubuskar0">N° Cronologico</span></td>
              <td width="84" align="center"><span class="titubuskar0">Fecha </span></td>
              <td width="153" align="center"><span class="titubuskar0">Empresa / Cliente</span></td>
              <td width="116" align="center"><span class="titubuskar0">Tipo Libro</span></td>
              <td width="101" align="center"><span class="titubuskar0">N° de Libro</span></td>
              <td width="68" align="center"><span class="titubuskar0">N° de Folio</span></td>
              <td width="101" align="center"><span class="titubuskar0">Tipo de Folio</span></td>
              <td width="73" align="center"><span class="titubuskar0">DNI / RUC</span></td>
              <td width="28" align="center">&nbsp;</td>
            </tr>
          </table></td>
        </tr>
        <tr>
          <td><div id="blibro" style="width:848px">
           
          </div></td>
        </tr>
      </table>
    </div></td>
  </tr>
</table>

</body>
</html>



